import axios from './axiosConfig';
import {base_url} from "../constant/baseConstant";

//登录
export const login = (user) => axios.post(`${base_url}admin/login`,user)
//注册
export const register = (user) => axios.post(`${base_url}admin/register`,user)

//测试
export const testSend = ()=>axios.get(`${base_url}admin/test`)


//获取待办列表
export const getTodos = (pageInfo)=>axios.post(`${base_url}todoInfo/page`,pageInfo)
//新增一条待办
export const addTodo = (todo)=>axios.post(`${base_url}todoInfo/`,todo)
//修改todo的状态
export const updateTodoStatus = (todo)=>axios.put(`${base_url}todoInfo/`,todo)